package com.cskaoyan.order.dto;
import com.cskaoyan.mall.commons.result.AbstractResponse;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class OrderDetailResponse extends AbstractResponse {

    private String orderId;

    private BigDecimal payment;

    private Integer paymentType;

    private BigDecimal postFee;

    private Integer status;

    private Date createTime;

    private Date updateTime;

    private Date paymentTime;

    private Date consignTime;

    private Date endTime;

    private Date closeTime;

    private String shippingName;

    private String shippingCode;

    private Long userId;

    private String buyerMessage;

    private String buyerNick;

    private Integer buyerComment;

    private List<OrderItemDto> goodsList;

    private OrderShippingDto orderShippingDto;

    private BigDecimal orderTotal;
    private String userName;
    private String tel;
    private String streetName;
    private Integer orderStatus;

    public void setOrderStatus(Integer status) {
        this.orderStatus=status;
    }


    public void setUserName(String buyerNick) {
        this.userName=buyerNick;
    }


    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public void setPayment(BigDecimal payment) {
        this.payment = payment;
    }

    public void setPaymentType(Integer paymentType) {
        this.paymentType = paymentType;
    }

    public void setPostFee(BigDecimal postFee) {
        this.postFee = postFee;
    }

    public void setStatus(Integer status) {
        this.orderStatus=status;
        this.status = status;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public void setPaymentTime(Date paymentTime) {
        this.paymentTime = paymentTime;
    }

    public void setConsignTime(Date consignTime) {
        this.consignTime = consignTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public void setCloseTime(Date closeTime) {
        this.closeTime = closeTime;
    }

    public void setShippingName(String shippingName) {
        this.shippingName = shippingName;
    }

    public void setShippingCode(String shippingCode) {
        this.shippingCode = shippingCode;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setBuyerMessage(String buyerMessage) {
        this.buyerMessage = buyerMessage;
    }

    public void setBuyerNick(String buyerNick) {
        this.userName=buyerNick;
        this.buyerNick = buyerNick;
    }

    public void setBuyerComment(Integer buyerComment) {
        this.buyerComment = buyerComment;
    }

    public void setGoodsList(List<OrderItemDto> goodsList) {
        this.goodsList = goodsList;
    }

    public void setOrderShippingDto(OrderShippingDto orderShippingDto) {
        this.orderShippingDto = orderShippingDto;
    }

    public void setOrderTotal(BigDecimal orderTotal) {
        this.orderTotal = orderTotal;
    }

    public void setTel(String tel) {

        this.tel = tel;
    }

    public void setStreetName(String streetName) {
        this.streetName = streetName;
    }

    @Override
    public String toString() {
        return "{" +
                "orderId='" + orderId + '\'' +
                ",orderTotal="+ orderTotal+
                ", payment=" + payment +
                ", paymentType=" + paymentType +
                ", postFee=" + postFee +
                ", status=" + status +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", paymentTime=" + paymentTime +
                ", consignTime=" + consignTime +
                ", endTime=" + endTime +
                ", closeTime=" + closeTime +
                ", shippingName='" + shippingName + '\'' +
                ", shippingCode='" + shippingCode + '\'' +
                ", userId=" + userId +
                ", buyerMessage='" + buyerMessage + '\'' +
                ", userName='" + buyerNick + '\'' +
                ", buyerComment=" + buyerComment +
                ", goodsList=" + goodsList +
                ", tel=" + orderShippingDto.getReceiverPhone() +
                ",streetName="+orderShippingDto.getReceiverAddress()+
                '}';
    }
}
